import numpy as np
import os

def gen_golden_data_simple():
    dtype = np.float16
    input_shape = [13, 3333]
    alpha = np.float32(0.1)

    dy = np.random.uniform(-1, 1, input_shape).astype(dtype)
    x  = np.random.uniform(-1, 1, input_shape).astype(dtype)

    # LeakyReLU 反向：dx = (x > 0) ? dy : alpha * dy
    golden = np.where(x > 0, dy, alpha * dy).astype(dtype)

    os.makedirs("input", exist_ok=True)
    os.makedirs("output", exist_ok=True)

    
    dy.astype(dtype).tofile("input/input_dy.bin")
    x.astype(dtype).tofile("input/input_x.bin")
    golden.astype(dtype).tofile("output/golden.bin")  

if __name__ == "__main__":
    gen_golden_data_simple()

